﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="CadastroEntradaProduto.aspx.cs" Inherits="LarDosIdosos.CadastroEntradaProduto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:UpdatePanel ID="updatePanelCadastroEntrada" runat="server">
<ContentTemplate>
<div style="float:left; width:100%;">
        <div style="float:left;width:100%;text-align:center;color:#BCDDAB">
            <h2>ENTRADA DE PRODUTO</h2>
        </div>
        <div style="float:left;width:100%;text-align:center;">
            <asp:Label ID="labelFeedBack" runat="server" Text=""/>
        </div>
        <table width="60%" cellspacing="20px" align="center">
            <tr>
                <td style="width:20%;">
                    Tipo de Produto:
                </td>
                <td>
                    <asp:DropDownList AutoPostBack="true" ID="dropDownListTipoDeProduto" runat="server" Style="width:30%" OnSelectedIndexChanged="dropDownListTipoDeProduto_OnSelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width:20%;">
                    Produto:
                </td>
                <td>
                    <asp:DropDownList AutoPostBack="true" ID="dropDownListProdutos" runat="server" Style="width:30%" OnSelectedIndexChanged="dropDownListProdutos_OnSelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width:20%;">
                    Quantidade:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxQuantidade" runat="server" Style="width:10%"></asp:TextBox>
                    <asp:Label ID="labelUnidadeDeMedida" runat="server" Style="width:10%"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView
                        ID="gridViewFuncionario"
                        runat="server"
                        Width="70%"
                        AutoGenerateColumns="False"
				        BackColor="#E9E9E9"
				        GridLines="None"
                        CellPadding="2">
                        
                        <AlternatingRowStyle BackColor="#f7f7f7"/>
				        <HeaderStyle BackColor="#EEEEEE" ForeColor="Black" />
					    <RowStyle Height="50px" BackColor="#FFFFFF" ForeColor="#555555"/>
                        <EmptyDataRowStyle BackColor="#F7F7F7" Height="100px" VerticalAlign="Middle" HorizontalAlign="Center" />
                        <Columns>
                            <asp:TemplateField HeaderStyle-Width="1%" ShowHeader="false">
					            <ItemTemplate>
                                    <asp:HiddenField ID="hiddenFieldId" runat="server" Value='<%# Eval("Codigo_Funcionario") %>' />
				                </ItemTemplate>
				            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Nome do Funcionário">
				                <ItemTemplate> 
				                    <asp:Label ID="labelNomeDoFuncionario" runat="server" Text='<%# Eval("Nome_Funcionario") %>' ></asp:Label>
				                </ItemTemplate>
				                <headerstyle Width="30%"/>
				            </asp:TemplateField>
                            <asp:TemplateField HeaderText="CPF do Funcionário">
				                <ItemTemplate> 
				                    <asp:Label ID="labelCpfDoFuncionario" runat="server" Text='<%# Eval("CPF_Funcionario") %>' ></asp:Label>
				                </ItemTemplate>
				                <headerstyle Width="20%"/>
				            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Email do Funcionário">
				                <ItemTemplate> 
				                    <asp:Label ID="labelEmailFuncionario" runat="server" Text='<%# Eval("Email_Funcionario") %>' ></asp:Label>
				                </ItemTemplate>
				                <headerstyle Width="30%"/>
				            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
            <tr id="trParceiro" runat="server" visible="false">
                <td colspan="2">
                    <div style="width:100%">
                        <table style="width:100%">
                            <tr id="trAdicionarParceiro" runat="server">
                                <td style="width:20%;">
                                    CPF do Parceiro:
                                </td>
                                <td>
                                    <asp:TextBox ID="textBoxCPFDoParceiro" runat="server" Style="width:30%" ></asp:TextBox>
                                    <asp:Button ID="buttonAdicionarParceiro" runat="server" OnClick="buttonAdicionarParceiro_OnClick" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:GridView
                                        ID="gridViewParceiro"
                                        runat="server"
                                        Width="70%"
                                        AutoGenerateColumns="False"
				                        BackColor="#E9E9E9"
				                        GridLines="None"
                                        CellPadding="2">
                        
                                        <AlternatingRowStyle BackColor="#f7f7f7"/>
				                        <HeaderStyle BackColor="#EEEEEE" ForeColor="Black" />
					                    <RowStyle Height="50px" BackColor="#FFFFFF" ForeColor="#555555"/>
                                        <EmptyDataRowStyle BackColor="#F7F7F7" Height="100px" VerticalAlign="Middle" HorizontalAlign="Center" />
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-Width="1%" ShowHeader="false">
					                            <ItemTemplate>
                                                    <asp:HiddenField ID="hiddenFieldId" runat="server" Value='<%# Eval("Codigo_Parceiro") %>' />
				                                </ItemTemplate>
				                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Nome do Parceiro">
				                                <ItemTemplate> 
				                                    <asp:Label ID="labelNomeDoParceiro" runat="server" Text='<%# Eval("Nome_Parceiro") %>' ></asp:Label>
				                                </ItemTemplate>
				                                <headerstyle Width="30%"/>
				                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="CPF do Parceiro">
				                                <ItemTemplate> 
				                                    <asp:Label ID="labelCpfDoParceiro" runat="server" Text='<%# Eval("CPF_Parceiro") %>' ></asp:Label>
				                                </ItemTemplate>
				                                <headerstyle Width="20%"/>
				                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Grau de parentesco com o Parceiro">
				                                <ItemTemplate> 
				                                    <asp:Label ID="labelEmailParceiro" runat="server" Text='<%# Eval("Email_Parceiro") %>' ></asp:Label>
				                                </ItemTemplate>
				                                <headerstyle Width="30%"/>
				                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr id="trIdoso" runat="server" visible="false">
                <td colspan="2">
                    <div style="width:100%">
                        <table style="width:100%">
                            <tr id="trAdicionarIdoso" runat="server">
                                <td style="width:20%;">
                                    CPF do Idoso:
                                </td>
                                <td>
                                    <asp:TextBox ID="textBoxCPFIdoso" runat="server" Style="width:30%" ></asp:TextBox>
                                    <asp:Button ID="buttonAdicionarIdoso" runat="server" OnClick="buttonAdicionarIdoso_OnClick" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:GridView
                                        ID="gridViewIdoso"
                                        runat="server"
                                        Width="70%"
                                        AutoGenerateColumns="False"
				                        BackColor="#E9E9E9"
				                        GridLines="None"
                                        CellPadding="2">
                        
                                        <AlternatingRowStyle BackColor="#f7f7f7"/>
				                        <HeaderStyle BackColor="#EEEEEE" ForeColor="Black" />
					                    <RowStyle Height="50px" BackColor="#FFFFFF" ForeColor="#555555"/>
                                        <EmptyDataRowStyle BackColor="#F7F7F7" Height="100px" VerticalAlign="Middle" HorizontalAlign="Center" />
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-Width="1%" ShowHeader="false">
					                            <ItemTemplate>
                                                    <asp:HiddenField ID="hiddenFieldId" runat="server" Value='<%# Eval("Codigo_Idoso") %>' />
				                                </ItemTemplate>
				                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Nome do Idoso">
				                                <ItemTemplate> 
				                                    <asp:Label ID="labelNomeDoIdoso" runat="server" Text='<%# Eval("Nome_Idoso") %>' ></asp:Label>
				                                </ItemTemplate>
				                                <headerstyle Width="30%"/>
				                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="CPF do Idoso">
				                                <ItemTemplate> 
				                                    <asp:Label ID="labelCpfDoIdoso" runat="server" Text='<%# Eval("CPF_Idoso") %>' ></asp:Label>
				                                </ItemTemplate>
				                                <headerstyle Width="20%"/>
				                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td>             
                </td>
                <td>
                    <asp:Button ID="buttonSalvar" runat="server" Text="Salvar" OnClick="buttonSalvar_Onclick"/>
                </td>
            </tr>
        </table>                            
    </div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
